#include  <stdio.h>
int main()
{
    int a[10] = {3,1,2,10,7,8,9,6,5,4};
    int n, i, j, k, t;
    scanf("%d", &n);
     i = 0 ;
    while(i < n-1)
    {
        k = i;
        j = i+1;
        while(j < n)
        {
            if(a[j] < a[k])
            if(a[j] < a[k]) k = j ;
            j++;
        }
        if(k != i)
        {
            t = a[k];
            a[k] = a[i];
            a[i] = t;
        }
        i++;
    }
    for(i = 0; i < n-1; i++)
        printf("%d ", a[i]);
    printf("%d\n", a[i]);
    return 0;
}
